<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Person>" %>
<%@ Import Namespace="RMH.Entities"%>
    <h3>Address:</h3>
    <table class="info">
        <tr>
            <td>
                <label for="AddressStreet1">
                    Street Address:</label>
            </td>
            <td>
                <%= Html.TextBox("AddressStreet1", Model.Address == null ? null : Model.Address.Street1)%>
                <%= Html.ValidationMessage("AddressStreet1", "*")%>
            </td>
            <td>
                <label for="AddressCity">
                    City:</label>
            </td>
            <td>
                <%= Html.TextBox("AddressCity", Model.Address == null ? null : Model.Address.City)%>
                <%= Html.ValidationMessage("AddressCity", "*")%>
            </td>
        </tr>
        <tr>
            <td>
                <label for="AddressStreet2">
                    Additional Address 1:</label>
            </td>
            <td>
                <%= Html.TextBox("AddressStreet2", Model.Address == null ? null : Model.Address.Street2)%>
                <%= Html.ValidationMessage("AddressStreet2", "*")%>
            </td>
            <td>
                <label for="AddressState">
                    State:</label>
            </td>
            <td>
                <%= Html.TextBox("AddressState", Model.Address == null ? null : Model.Address.State)%>
                <%= Html.ValidationMessage("AddressState", "*")%>
            </td>
        </tr>
        <tr>
            <td>
                <label for="AddressStreet3">
                    Additional Address 2:</label>
            </td>
            <td>
                <%= Html.TextBox("AddressStreet3", Model.Address == null ? null : Model.Address.Street3)%>
                <%= Html.ValidationMessage("AddressStreet3", "*")%>
            </td>
            <td>
                <label for="AddressPostalCode">
                    Postal Code:</label>
            </td>
            <td>
                <%= Html.TextBox("AddressPostalCode", Model.Address == null ? null : Model.Address.PostalCode)%>
                <%= Html.ValidationMessage("AddressPostalCode", "*")%>
            </td>
        <% if (ViewData["counties"] != null) {%>
            </tr><tr>
            <td>
                <label for="CountyId">County:</label>
            </td>
            <td>
                <%= Html.DropDownList("CountyId", (IEnumerable<SelectListItem>)ViewData["counties"])%>
                <%= Html.ValidationMessage("CountyId","*") %>
            </td><%} %>            
        </tr>
    </table>